<template>
  <div class="student-profill">
    <el-avatar
      :size="300"
      shape="square"
      :src="currentRow.headimgurl ? currentRow.headimgurl : defAvatarUrl"
    >
    </el-avatar>
    <el-descriptions title="学员资料" direction="vertical" :column="3" border>
      <el-descriptions-item label="sId"
        ><el-tag type="success">{{ currentRow.sId }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="姓名">
        <el-tag type="info">{{ currentRow.name }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="年龄">
        <el-tag type="warning">{{ currentRow.age }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="班级">
        <el-tag type="danger">{{ currentRow.class }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="学历">
        <el-tag size="large">{{ currentRow.degree }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="项目地址"
        ><el-tag type="danger" effect="dark">{{
          currentRow.productUrl
        }}</el-tag> </el-descriptions-item
      ><el-descriptions-item label="描述"
        ><el-tag type="warning" effect="dark">{{
          currentRow.description
        }}</el-tag></el-descriptions-item
      >
      <el-descriptions-item label="城市">
        <el-tag type="info" effect="dark">{{ currentRow.city }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="创建时间"
        ><el-tag type="success" effect="dark">{{
          currentRow.cTime
        }}</el-tag></el-descriptions-item
      >
    </el-descriptions>
    <el-button type="primary" @click="back">点击返回列表</el-button>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  methods: {
    back() {
      this.$router.push({ name: "StudentProduct" });
    },
  },
  computed: {
    ...mapState(["currentRow"]),
  },
  data() {
    return {
      defAvatarUrl:
        "https://tse1-mm.cn.bing.net/th/id/R-C.14d4710ae87317cb4fad395e5341503f?rik=4GHvSLKaLnXpDg&riu=http%3a%2f%2fpic.962.net%2fup%2f2017-7%2f2017073011154628004.jpg&ehk=Rn8Ohnd764YxLdSxD3F7SzvlqL2EKczZKN4NkxmNf0U%3d&risl=&pid=ImgRaw&r=0",
    };
  },
};
</script>
